<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>工作计划类型编辑</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
<link href="/widget/iconfont/iconfont.css" rel="stylesheet" />
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
<script language="javascript" type="text/javascript" src="/widget/datepicker/WdatePicker.js"></script>
</head>
<body>
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <!--列表-->
                <section class="panel panel-padding">
                   <form id="form1" class="layui-form layui-form-pane">
                        <div class="layui-form-item">
                            <label class="layui-form-label">名称</label>
                            <div class="layui-input-inline">
                                <input type="text" id="title" value="{title}" name="title" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">角色</label>
                            <div class="layui-input-inline">
                                <select name="role" id="role">
                                    <option value="">请选择角色</option>
                                    <!-- START role -->
                                    <option value="{id}">{rolename}</option>
                                    <!-- END role -->
                                </select>
                            </div>
                         </div>  
                        <div class="layui-form-item">
                            <label class="layui-form-label">上午上班</label>
                            <div class="layui-input-inline">
                              <input type="text" name="am_on" id="am_on" value="{am_on}" class="layui-input" onClick="WdatePicker({dateFmt:'HH:mm:ss'})">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">上午下班</label>
                            <div class="layui-input-inline">
                              <input type="text" name="am_off" id="am_off" value="{am_off}" class="layui-input" onClick="WdatePicker({dateFmt:'HH:mm:ss'})">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">下午上班</label>
                            <div class="layui-input-inline">
                              <input type="text" name="pm_on" id="pm_on" value="{pm_on}" class="layui-input" onClick="WdatePicker({dateFmt:'HH:mm:ss'})">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">下午下班</label>
                            <div class="layui-input-inline">
                              <input type="text" name="pm_off" id="pm_off" value="{pm_off}" class="layui-input" onClick="WdatePicker({dateFmt:'HH:mm:ss'})">
                            </div>
                        </div>
                        <div class="layui-form-item col-md-8" pane>
                            <label class="layui-form-label">公休日</label>
                            <div class="layui-input-block">
                                <input type="checkbox" name="holiday[]"  title="周一" value="1"  />
                                <input type="checkbox" name="holiday[]"  title="周二" value="2" />
                                <input type="checkbox" name="holiday[]"  title="周三" value="3"  />
                                <input type="checkbox" name="holiday[]"  title="周四" value="4" />
                                <input type="checkbox" name="holiday[]"  title="周五" value="5"  />
                                <input type="checkbox" name="holiday[]"  title="周六" value="6" />
                                <input type="checkbox" name="holiday[]"  title="周日" value="7"  />
                            </div>
                        </div>
                        <input type="hidden" name="id" id="id" value="{id}">
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="button" id="btn_save" value="立即提交" class="layui-btn" />
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
         </div>
     </div>
</div>
   {jsmodel}
   <script type="text/javascript">      
        var role = '{role}';
        var holiday = '{holiday}';
        if(role)$('#role').val(role);
        if(holiday){
            var holidayarr = holiday.split(",");
            $('input[name="holiday[]"]').val(holidayarr);
        }
        layui.use('attend_edit_rest');		
    </script>
</body>
</html>
